home *** CD-ROM | disk | FTP | other *** search
/ C/C++ Users Group Library 1996 July / C-C++ Users Group Library July 1996.iso / vol_200 / 250_01 / fpmul.s < prev    next >
Text File  |  1987-10-27  |  640b  |  34 lines

  1.     .ttl    "fpmul.s"
  2.  
  3. * MC68020/MC68881 IEEE Format Single Precision Routines
  4. *
  5. * Written by: Edmund H. Ramm
  6. *
  7. * fpmul entry for single prec. multiplication, operands in 4(sp) and 8(sp)
  8. *
  9. *     sp     4      8
  10. *    ----------------------
  11. *    | ret  |  a   |   b  |
  12.  
  13.     .text
  14.     .globl    fpmul,_fpmul,fpmult,_fpmult
  15.  
  16.  
  17. fpmul:
  18. _fpmul:
  19. fpmult:
  20. _fpmult:
  21. ~~fpmul:
  22. *
  23. *    on exit, d0 = 4(sp) * 8(sp)
  24. *
  25. *    fmove.s    4(sp),fp0        * fp0 <-- "a"
  26.     dc.w    $f22f,$4400,$0004
  27. *    fsglmul.s    8(sp),fp0    * fp0 <-- "a" * "b"
  28.     dc.w    $f22f,$4427,$0008
  29. *    fmove.s    fp0,d0            * d0 <-- product
  30.     dc.w    $f200,$6400
  31.     rts
  32.  
  33.     .end
  34.